import { flatTreeList } from '@/utils/util'

//导出菜单列表
export const menuList = [
  {
    name: 'Basic',
    title: '基础用法',
    icon: 'menu',
    children: [
      {
        name: 'Basic01',
        title: '基础场景',
        component: () => import('@/views/pages/01-basic/01-basic/index.vue'),
      },
      {
        name: 'Basic02',
        title: 'Viewer查看器',
        component: () => import('@/views/pages/01-basic/02-viewer/index.vue'),
      },
      {
        name: 'Basic03',
        title: '自定义地图与地图的叠加',
        component: () => import('@/views/pages/01-basic/03-custom/index.vue'),
      },
      {
        name: 'Basic04',
        title: '地形',
        component: () => import('@/views/pages/01-basic/04-dixing/index.vue'),
      },
      {
        name: 'Basic05',
        title: '坐标系和坐标系转换',
        component: () => import('@/views/pages/01-basic/05-zuobiao/index.vue'),
      },
      {
        name: 'Basic06',
        title: '相机的方向和位置',
        component: () => import('@/views/pages/01-basic/06-camera/index.vue'),
      },
      {
        name: 'Basic07',
        title: '动态控制相机',
        component: () => import('@/views/pages/01-basic/07-camera-ctrl/index.vue'),
      },
    ],
  },
  {
    name: 'Add',
    title: '增加物体',
    icon: 'menu',
    children: [
      {
        name: 'Add01',
        title: '增加物体、标签和文字',
        component: () => import('@/views/pages/02-add/01-gameobject/index.vue'),
      },
      {
        name: 'Add02',
        title: '添加3d模型和设置',
        component: () => import('@/views/pages/02-add/02-model/index.vue'),
      },
      {
        name: 'Add03',
        title: 'Geojson',
        component: () => import('@/views/pages/02-add/03-geojson/index.vue'),
      },
      {
        name: 'Add04',
        title: 'KML',
        component: () => import('@/views/pages/02-add/04-kml/index.vue'),
      },
      {
        name: 'Add05',
        title: 'KMZ',
        component: () => import('@/views/pages/02-add/05-kmz/index.vue'),
      },
    ],
  },
  {
    name: 'Tiles',
    title: '增加物体',
    icon: 'menu',
    children: [
      {
        name: 'Tiles01',
        title: '3DTiles与性能监控',
        component: () => import('@/views/pages/03-tiles/01-3dtiles/index.vue'),
      },
      {
        name: 'Tiles02',
        title: '建筑物样式',
        component: () => import('@/views/pages/03-tiles/02-3dbuilding/index.vue'),
      },
    ],
  },
]

// 处理拉平树结构菜单
export const flatMenus = flatTreeList(menuList)
